#ifndef __CC_NETIO_H__
#define __CC_NETIO_H__

#include <stdint.h>
#include <netpacket/packet.h>

struct netio_handler
{
    int fd;
    struct sockaddr_ll dev_addr;
    int mtu;
};

int netio_handler_init(struct netio_handler* nh, const char* dev);
void netio_destroy(struct netio_handler* nh);
int netio_read(struct netio_handler* nh, uint8_t* buf, uint16_t len);
int netio_write(struct netio_handler* nh, uint8_t* buf, uint16_t len);

#endif

